package day4.zy3;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Test {
    public static void main(String[] args) {
        FileInputStream fin=null;
        try {
            fin =new FileInputStream("D:\\0923作业\\作业07.c");
            byte[] b =new byte[fin.available()];//文件不能太大
            int length=0;
            length =fin.read(b);
            System.out.println(new String(b,0,length));

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fin.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
